Keep up with recent changes in xen-unstable
authordjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Thu, 29 Sep 2005 23:29:23 +0000 (17:29 -0600)
committerdjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Thu, 29 Sep 2005 23:29:23 +0000 (17:29 -0600)
linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c
linux-2.6-xen-sparse/arch/ia64/xen/drivers/patches/gnttab.c.patch
linux-2.6-xen-sparse/arch/ia64/xen/drivers/xenia64_init.c

index e5c3a50f78a725c9eb02955237db00862419b14e..9f64f0ce4e34b09f22aab25a39bba4e355aeb1cc 100644 (file)
@@ -7,6 +7,9 @@
 #include <asm-xen/evtchn.h>
 
 #define MAX_EVTCHN 256
+
+#define VALID_EVTCHN(_chn) ((_chn) >= 0)
+
 static struct {
        irqreturn_t (*handler)(int, void *, struct pt_regs *);
        void *dev_id;
@@ -73,6 +76,14 @@ void unbind_evtchn_from_irq(unsigned int evtchn)
        while(1);
 }
 
+void notify_remote_via_irq(int irq)
+{
+       int evtchn = virq_to_evtchn[irq];       // FIXME... is this right??
+
+       if (VALID_EVTCHN(evtchn))
+               notify_remote_via_evtchn(evtchn);
+}
+
 irqreturn_t evtchn_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
     u32            l1, l2;
index 78ce7f768a5698f3a88782fa594640a3bfa14a15..84d89e1825668721cdc16763d2f16c9291701e5a 100644 (file)
@@ -1,7 +1,7 @@
 diff -Naur xen/core/gnttab.c xen.patched/core/gnttab.c
 --- xen/core/gnttab.c  2005-09-23 10:54:50.000000000 -0600
 +++ xen.patched/core/gnttab.c  2005-09-23 10:57:51.000000000 -0600
-@@ -22,6 +22,10 @@
+@@ -19,6 +19,10 @@
  #include <asm-xen/gnttab.h>
  #include <asm/synch_bitops.h>
  
@@ -10,59 +10,59 @@ diff -Naur xen/core/gnttab.c xen.patched/core/gnttab.c
 +#endif
 +
  #if 1
- #define ASSERT(_p) \
-     if ( !(_p) ) { printk(KERN_ALERT"Assertion '%s': line %d, file %s\n", \
-@@ -339,6 +343,10 @@
-     if ( hypercall.op != __HYPERVISOR_grant_table_op )
-         return -ENOSYS;
+ #define ASSERT(_p)                                                          \
+       if ( !(_p) ) { printk(KERN_ALERT"Assertion '%s': line %d, file %s\n", \
+@@ -346,6 +350,10 @@
+       if ( hypercall.op != __HYPERVISOR_grant_table_op )
+               return -ENOSYS;
  
 +
 +#ifdef __ia64__
-+    ret = HYPERVISOR_grant_table_op(hypercall.arg[0], (void *)hypercall.arg[1], hypercall.arg[2]);
++      ret = HYPERVISOR_grant_table_op(hypercall.arg[0], (void *)hypercall.arg[1], hypercall.arg[2]);
 +#else
-     /* hypercall-invoking asm taken from privcmd.c */
-     __asm__ __volatile__ (
-         "pushl %%ebx; pushl %%ecx; pushl %%edx; pushl %%esi; pushl %%edi; "
-@@ -351,6 +359,7 @@
-         TRAP_INSTR "; "
-         "popl %%edi; popl %%esi; popl %%edx; popl %%ecx; popl %%ebx"
-         : "=a" (ret) : "0" (&hypercall) : "memory" );
+       /* hypercall-invoking asm taken from privcmd.c */
+       __asm__ __volatile__ (
+               "pushl %%ebx; pushl %%ecx; pushl %%edx; "
+@@ -359,6 +367,7 @@
+               TRAP_INSTR "; "
+               "popl %%edi; popl %%esi; popl %%edx; popl %%ecx; popl %%ebx"
+               : "=a" (ret) : "0" (&hypercall) : "memory" );
 +#endif
  
-     return ret;
+       return ret;
  }
-@@ -414,8 +423,13 @@
-     BUG_ON(HYPERVISOR_grant_table_op(GNTTABOP_setup_table, &setup, 1) != 0);
-     BUG_ON(setup.status != 0);
+@@ -423,8 +432,13 @@
+       BUG_ON(HYPERVISOR_grant_table_op(GNTTABOP_setup_table, &setup, 1));
+       BUG_ON(setup.status != 0);
  
 +#ifdef __ia64__
-+    shared = __va(frames[0] << PAGE_SHIFT);
-+    printk("grant table at %p\n", shared);
++      shared = __va(frames[0] << PAGE_SHIFT);
++      printk("grant table at %p\n", shared);
 +#else
-     for ( i = 0; i < NR_GRANT_FRAMES; i++ )
-         set_fixmap(FIX_GNTTAB_END - i, frames[i] << PAGE_SHIFT);
+       for (i = 0; i < NR_GRANT_FRAMES; i++)
+               set_fixmap(FIX_GNTTAB_END - i, frames[i] << PAGE_SHIFT);
 +#endif
  
-     return 0;
+       return 0;
  }
-@@ -425,8 +439,10 @@
+@@ -434,8 +448,10 @@
  {
-     int i;
+       int i;
  
 +#ifndef __ia64__
-     for ( i = 0; i < NR_GRANT_FRAMES; i++ )
-       clear_fixmap(FIX_GNTTAB_END - i);
+       for (i = 0; i < NR_GRANT_FRAMES; i++)
+               clear_fixmap(FIX_GNTTAB_END - i);
 +#endif
  
-     return 0;
+       return 0;
  }
-@@ -441,7 +457,9 @@
+@@ -450,7 +466,9 @@
  
-     BUG_ON(gnttab_resume());
+       BUG_ON(gnttab_resume());
  
 +#ifndef __ia64__
-     shared = (grant_entry_t *)fix_to_virt(FIX_GNTTAB_END);
+       shared = (grant_entry_t *)fix_to_virt(FIX_GNTTAB_END);
 +#endif
  
-     for ( i = 0; i < NR_GRANT_ENTRIES; i++ )
-         gnttab_list[i] = i + 1;
+       for (i = NR_RESERVED_ENTRIES; i < NR_GRANT_ENTRIES; i++)
+               gnttab_list[i] = i + 1;
index 4696da61d329c8e0db0b1b97a12b03e22657a420..0a16416895587fb213b6b1f1cfe823990cb22739 100644 (file)
@@ -45,4 +45,8 @@ unsigned long alloc_empty_foreign_map_page_range(unsigned long pages)
 
        return (unsigned long)vma->addr;
 }
+
+/* These should be define'd but some drivers use them without
+ * a convenient arch include */
+unsigned long mfn_to_pfn(unsigned long mfn) { return mfn; }
 #endif